using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DataStructure
{
    public class SortedArray1Set<Key> : ISet<Key> where Key : IComparable<Key>
    {
        private SortArray1<Key> s;
        public SortedArray1Set(int capacity)
        {
            s = new SortArray1<Key>(capacity);
        }
        public SortedArray1Set()
        {
            s = new SortArray1<Key>();
        }
        public int Count => s.Count;

        public bool IsEmpty => s.IsEmpty;

        public void Add(Key key)
        {
            s.Add(key);
        }

        public bool Contains(Key key)
        {
            return s.Contains(key);
        }

        public void Remove(Key key)
        {
            s.Remove(key);
        }
    }
}